package cultu.community.service.impl;

import java.util.Date;

import cultu.community.dao.CommunityStatsDAO;
import cultu.community.message.CommunityStats;
import cultu.community.message.OrderEvolutionStat;
import cultu.community.service.CommunityStatsService;

/**
 * The Class CommunityStatsServiceImpl.
 */
public class CommunityStatsServiceImpl implements CommunityStatsService
{

	/** The community stats dao. */
	private CommunityStatsDAO communityStatsDAO;

	/**
	 * cultu.community.service.CommunityStatsService#getCommunityStats()
	 */
	public CommunityStats getCommunityStats()
	{
		return communityStatsDAO.getCommunityStats();
	}

	/**
	 * Sets the community stats dao.
	 *
	 * @param communityStatsDAO the new community stats dao
	 */
	public void setCommunityStatsDAO(CommunityStatsDAO communityStatsDAO)
	{
		this.communityStatsDAO = communityStatsDAO;
	}

	/**
	 * cultu.community.service.CommunityStatsService#getOrdersEvolutionStat()
	 */
	public OrderEvolutionStat getOrdersEvolutionStat()
	{
		return communityStatsDAO.getOrdersEvolution();
	}

  /**
   * cultu.community.service.CommunityStatsService#getNbOrders(java.util.Date)
   */
  public int getNbOrders(Date pDate)
  {
    return communityStatsDAO.getNbOrders(pDate);
  }

  /**
   * cultu.community.service.CommunityStatsService#getNbSubscriptions(java.util.Date)
   */
  public int getNbSubscriptions(Date pDate)
  {
    return communityStatsDAO.getNbSubscriptions(pDate);
  }

  /**
   * cultu.community.service.CommunityStatsService#getNbProducts(java.util.Date)
   */
  public int getNbProducts(Date pDate)
  {
    return communityStatsDAO.getNbProducts(pDate);
  }

}
